addon = LibStub("AceAddon-3.0"):NewAddon("addon", "AceEvent-3.0", "AceConsole-3.0")

function addon:OnInitialize()
    addon:RegisterEvent("TIME_PLAYED_MSG")
    addon:RegisterEvent("BAG_UPDATE")
    self.db = LibStub("AceDB-3.0"):New("SingleWolfHelperDB")
    player = self.db.profile

    RefreshPlayerInfo()

    self.db.profile = player
end

function addon:TIME_PLAYED_MSG(eventName, allTime, currentLevelTime)
    player.AllTime = allTime
    player.CurrentLevelTime = currentLevelTime
end

function addon:BAG_UPDATE()
    RefreshPlayerInfo()
end

function addon:OnEnable()
end

function addon:OnDisable()
end
